package org.homeworkadmin.admin.service.impl;

import org.homeworkadmin.admin.domain.Users;
import org.homeworkadmin.admin.mapper.UsersMapper;
import org.homeworkadmin.admin.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;

    @Override
    public int getUsersCount(String account,String userPassword,String userName,String userPhone) {
        return usersMapper.getUsersCount(account, userPassword, userName, userPhone);
    }
    @Override
    public List<Users> getUsers(String account,String userPassword,String userName,String userPhone,int pagesize,int currpage) {
        return usersMapper.getUsers(account, userPassword, userName, userPhone, pagesize, currpage);
    }

    @Override
    public int updateUser(Users users) {
        return usersMapper.updateUser(users);
    }

    @Override
    public int delUser(int userId) {
        return usersMapper.delUser(userId);
    }

    @Override
    public int addUser(Users users) {
        return usersMapper.addUser(users);
    }
}
